<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <canvas id="c1" width="600" height="400"></canvas>

    <script>
        /** @type {HTMLCanvasElement} */
        // 画布
        let c1 = document.getElementById("c1")
        // 画笔
        let ctx = c1.getContext("2d")

        ctx.beginPath()
        // 起点
        ctx.moveTo(0, 0)
        // 三点两线画圆弧
        ctx.arcTo(35, 25, 25, 25, 10)
        ctx.stroke()
        ctx.closePath()

        // 二次贝塞尔曲线画气泡框
        ctx.beginPath()
        ctx.moveTo(200, 300)
        ctx.quadraticCurveTo(150, 300, 150, 200)
        ctx.quadraticCurveTo(150, 100, 300, 100)
        ctx.quadraticCurveTo(450, 100, 450, 200)
        ctx.quadraticCurveTo(450, 300, 250, 300)
        ctx.quadraticCurveTo(250, 350, 150, 350)
        ctx.quadraticCurveTo(200, 350, 200, 300)
        ctx.stroke()
        ctx.closePath()
    </script>
</body>

</html>